﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
using Ultilities;
using Entity;

namespace SalonManager
{
    public partial class FrmControl : Form
    {
        public FrmControl()
        {
            InitializeComponent();
            this.Load += new EventHandler(Form1_Load);
        }
        
        void Form1_Load(object sender, EventArgs e)
        {
            //string strCon = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source='C:\Documents and Settings\KEN\My Documents\SLM.accdb'";
            //OleDbConnection oleCon = new OleDbConnection(strCon);
            //oleCon.Open();
            //OleDbCommand command = new OleDbCommand("ServiceType_procGetByID",oleCon);
            //command.CommandType = CommandType.StoredProcedure;
            //command.Parameters.AddWithValue("ServiceTypeID", comboBoxEdit1.EditValue);
            //OleDbDataAdapter adapter = new OleDbDataAdapter(command);
            //DataTable dt = new DataTable();
            //adapter.Fill(dt);
            //if (dt != null && dt.Rows.Count > 0)
            //{
            //    gridView.DataSource = dt;
            //}
        }

        #region Toolbar

        protected override void OnVisibleChanged(EventArgs e)
        {
            if (this.Visible == true)
            {
                //SetToolbarButton(TabpageName.Action);                
            }
            base.OnVisibleChanged(e);
        }

        #endregion

        private void FrmControl_Load(object sender, EventArgs e)
        {
            using (HSLMNGDataContext context = new HSLMNGDataContext())
            {
                var statusList = context.Status.ToList();
                lookUpEdit1.Properties.DataSource = statusList;
            }
        }

        private void gridControl1_EmbeddedNavigator_ButtonClick(object sender, DevExpress.XtraEditors.NavigatorButtonClickEventArgs e)
        {

        }

    }
}
